/*
 * @Date: 2023-02-10 22:12:58
 * @LastEditTime: 2023-09-01 11:07:30
 * @FilePath: /wkw/src/language/index.ts
 * 介绍:
 */
import { createI18n } from "vue-i18n";
import { getLangAll } from "./helper";

export const languageList = getLangAll();

//注册i8n实例并引入语言文件
export const i18n = createI18n({
  legacy: false,
  global: true,
  globalInjection: true,
  locale: import.meta.env.VITE_DEFAULT_LANG, // 默认语言
  fallbackLocale: "zh-CN", // 回退语言
  messages: languageList,
});
